//
//  PGVideoView.m
//  youqu
//
//  Created by 彭鹏 on 16/10/17.
//  Copyright © 2016年 pengpeng. All rights reserved.
//

#import "PGVideoView.h"
#import "PGPostItem.h"
#import <SDWebImage/UIImageView+WebCache.h>


@interface PGVideoView ()
@property (weak, nonatomic) IBOutlet UILabel *playCountLabel;
@property (weak, nonatomic) IBOutlet UILabel *playTimeLabel;
@property (weak, nonatomic) IBOutlet UIImageView *videoImageView;

@end

@implementation PGVideoView
- (IBAction)playButtonClick {
    
}

- (void)setItem:(PGPostItem *)item {
    _item = item;
    [_videoImageView sd_setImageWithURL:[NSURL URLWithString:item.image0]];
    _playTimeLabel.text = [NSString stringWithFormat:@"%d时间",item.videotime];
    _playCountLabel.text = [NSString stringWithFormat:@"%zd播放",item.playcount];
}


+ (instancetype)videoView {
    return [[[NSBundle mainBundle] loadNibNamed:NSStringFromClass(self) owner:nil options:nil] firstObject];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
